Optimal. Leaf size=77 \[ \frac{1}{4} \sqrt{\pi } e^{\frac{b^2}{4}-i a} \text{Erfi}\left (\frac{1}{2} (2 x-i b)\right )+\frac{1}{4} \sqrt{\pi } e^{\frac{b^2}{4}+i a} \text{Erfi}\left (\frac{1}{2} (2 x+i b)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0508698, antiderivative size = 77, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {4473, 2234, 2204} \[ \frac{1}{4} \sqrt{\pi } e^{\frac{b^2}{4}-i a} \text{Erfi}\left (\frac{1}{2} (2 x-i b)\right )+\frac{1}{4} \sqrt{\pi } e^{\frac{b^2}{4}+i a} \text{Erfi}\left (\frac{1}{2} (2 x+i b)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4473
Rule 2234
Rule 2204
Rubi steps
\begin{align*} \int e^{x^2} \cos (a+b x) \, dx &=\int \left (\frac{1}{2} e^{-i a-i b x+x^2}+\frac{1}{2} e^{i a+i b x+x^2}\right ) \, dx\\ &=\frac{1}{2} \int e^{-i a-i b x+x^2} \, dx+\frac{1}{2} \int e^{i a+i b x+x^2} \, dx\\ &=\frac{1}{2} e^{-i a+\frac{b^2}{4}} \int e^{\frac{1}{4} (-i b+2 x)^2} \, dx+\frac{1}{2} e^{i a+\frac{b^2}{4}} \int e^{\frac{1}{4} (i b+2 x)^2} \, dx\\ &=\frac{1}{4} e^{-i a+\frac{b^2}{4}} \sqrt{\pi } \text{erfi}\left (\frac{1}{2} (-i b+2 x)\right )+\frac{1}{4} e^{i a+\frac{b^2}{4}} \sqrt{\pi } \text{erfi}\left (\frac{1}{2} (i b+2 x)\right )\\ \end{align*}
Mathematica [A] time = 0.0814511, size = 82, normalized size = 1.06 \[ \frac{1}{4} \sqrt{\pi } e^{\frac{b^2}{4}} \left (-\sin (a) \left (\text{Erf}\left (\frac{b}{2}-i x\right )+\text{Erf}\left (\frac{b}{2}+i x\right )\right )+\cos (a) \text{Erfi}\left (\frac{1}{2} (2 x-i b)\right )+\cos (a) \text{Erfi}\left (\frac{1}{2} (2 x+i b)\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.04, size = 54, normalized size = 0.7 \begin{align*} -{\frac{i}{4}}\sqrt{\pi }{{\rm e}^{{\frac{{b}^{2}}{4}}}}{{\rm e}^{-ia}}{\it Erf} \left ( ix+{\frac{b}{2}} \right ) +{\frac{i}{4}}\sqrt{\pi }{{\rm e}^{{\frac{{b}^{2}}{4}}}}{{\rm e}^{ia}}{\it Erf} \left ( -ix+{\frac{b}{2}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.05873, size = 70, normalized size = 0.91 \begin{align*} -\frac{1}{4} \, \sqrt{\pi }{\left ({\left (i \, \cos \left (a\right ) + \sin \left (a\right )\right )} \operatorname{erf}\left (\frac{1}{2} \, b + i \, x\right ) e^{\left (\frac{1}{4} \, b^{2}\right )} +{\left (i \, \cos \left (a\right ) - \sin \left (a\right )\right )} \operatorname{erf}\left (-\frac{1}{2} \, b + i \, x\right ) e^{\left (\frac{1}{4} \, b^{2}\right )}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.476709, size = 127, normalized size = 1.65 \begin{align*} \frac{1}{4} \, \sqrt{\pi }{\left (-i \, \operatorname{erf}\left (-\frac{1}{2} \, b + i \, x\right ) e^{\left (\frac{1}{4} \, b^{2} + i \, a\right )} - i \, \operatorname{erf}\left (\frac{1}{2} \, b + i \, x\right ) e^{\left (\frac{1}{4} \, b^{2} - i \, a\right )}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int e^{x^{2}} \cos{\left (a + b x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos \left (b x + a\right ) e^{\left (x^{2}\right )}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]